Package-level declarations

Types

Link copied to clipboard

English syllables, counted by vowel groups less a silent final "e".

Link copied to clipboard

Every word worth the same, for a language this library has no count for.

Link copied to clipboard
object Pieces

Cutting a recording into the pieces a recogniser is given one at a time.

Link copied to clipboard
data class RecognizedWord(val text: String, val start: Double, val end: Double)

A word a recogniser returned, and where in the recording it heard it.

Link copied to clipboard
@Serializable
data class Rules(val matchThreshold: Double, val joinFloor: Double, val gapPenalty: Double, val mismatchPenalty: Double, val roomEnough: Double, val joinSpan: Int, val vouchedJoinSpan: Int, val englishVowels: String, val silentEnding: String, val silentEndingExceptAfter: String, val shortestWithASilentEnding: Int, val lightestWord: Double, val liftedMarksFrom: String, val liftedMarksTo: String, val letterJoiners: List<String>, val foldedLetters: Map<String, String>, val frameSeconds: Double, val roomQuantile: Double, val speechAboveRoom: Double, val quietestRoom: Double, val holdLimit: Double, val leastWidening: Double, val speechFromLoudestShare: Double, val quietestSpeech: Double, val pieceSeconds: Double, val shortestPieceShare: Double, val pauseSeconds: Double, val edgeOverlap: Double, val askAgainTrims: List<Double>, val shortestWorthAskingAgain: Double, val uncoveredHeadSeconds: Double, val partialAnswerOverlap: Double)

The numbers the alignment is tuned to. What each is for is written beside it in rules.yaml.

Link copied to clipboard

Holds a word open through the silence behind it, and widens it into the quiet on both sides.

Link copied to clipboard
interface SpeechWeighting

How much of a pause a word is worth when a stretch has to be shared out.

Link copied to clipboard

Lines a recogniser's output up with the text that was read, and says when each word of that text was spoken.

Link copied to clipboard
Link copied to clipboard
data class WordMatch(val expected: IntRange, val heard: IntRange)

One written word lined up with one heard word, or with the two that stood in for it.

Link copied to clipboard
data class WordSpan(val start: Double, val end: Double)

When one word of the text was spoken.

Functions

Link copied to clipboard
fun fold(word: String): String

The word with its marks taken off, so that likeness can be measured without them.

Link copied to clipboard
fun normalize(word: String): String

What a recogniser drops or invents, taken off both sides before they are compared.

Link copied to clipboard

Gather a recogniser's tokens into the words they spell.